package com.zjitc.p1.config;

import com.zjitc.p1.obj.Teacher;
import com.zjitc.p1.obj.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/13 13:48
 * @description:
 */
@Configuration
@ImportResource(locations = {"classpath:spring-configuration2.xml"})
public class JavaConfiguration2 {

  @Bean
  public User user(Teacher teacher) {
    return new User(teacher);
  }
}
